
<?php echo $this->fetch('header.php'); ?>
<div class="layout">
	<?php if ($this->_var['draft']): ?>
	<form action="?action=content&do=draft_delete" method="post" id="darft_form">
	<table cellspacing="0" cellpadding="0" width="100%" class="table">
		<thead>
		<tr>
		<th width="30" align="center" nowrap="nowrap">&nbsp;</th>
		<th align="left">标题</td>
		<th align="center">作者</td>
		<th align="center" width="150" nowrap>时间</td>
		</tr>
		</thead>
		<tbody>
		<?php $_from=$this->_var['draft']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('$attrs[key]', '$attrs[item]');if (count($_from)):
    foreach ($_from AS $this->_var['draft_0_42219900_1333200004']):
?>
		<tr>
		<td height="30" align="center" ><input type="checkbox" class="checkbox" name="draft_id[]" value="<?php echo $this->_var['draft_0_42219900_1333200004']['id']; ?>" /></td>
		<td><a href="?action=content&do=article_add&draft_id=<?php echo $this->_var['draft_0_42219900_1333200004']['id']; ?>"><?php echo $this->_var['draft_0_42219900_1333200004']['title']; ?></a>

		</td>
		<td align="center" nowrap><?php echo $this->_var['draft_0_42219900_1333200004']['author']; ?></td>
		<td align="center" style="color:#666" nowrap><?php echo $this->_var['draft_0_42219900_1333200004']['time']; ?></td>
		</tr>
		<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();?>
		</tbody>
		<tfoot>
		<tr>
		<td height="30" align="center"><input type="checkbox" onclick="check_all(this)" /></td>
		<td align="right" colspan="3"><div style="float:right;margin:8px;"><?php echo $this->fetch('pager.php'); ?></div><a href="javascript:del()" class="button">批量删除</a></td>
		</tr>
		</tfoot>
	</table>
	</form>
	<?php else: ?>
	<div style="line-height:50px;text-align:center;">暂无数据</div>
	<?php endif; ?>
</div>
<script type="text/javascript">
function del(){
	var status=false;
	$('.checkbox').each(function(){
		if($(this).attr('checked')){
			status=true;
		}
	});
	if(!status){
		alert('至少选择一项');
		return false;
	}
	$('#darft_form').submit();
}
</script>